@inherits FluentInputBase<bool>
@using System.Globalization
<fluent-checkbox href="@Href" disabled="@Disabled" checked="@BindConverter.FormatValue(CurrentValue)" @onchange="EventCallback.Factory.CreateBinder<bool>(this, __value => CurrentValue = __value, CurrentValue)" required="@Required" @attributes="AdditionalAttributes">@ChildContent</fluent-checkbox>
@code
{
    [Parameter] public string Href { get; set; }

    [Parameter] public bool? Disabled { get; set; }

    [Parameter] public bool? Required { get; set; }

    [Parameter] public RenderFragment ChildContent { get; set; }

    protected override bool TryParseValueFromString(string value, out bool result, out string validationErrorMessage) =>
        throw new NotSupportedException($"This component does not parse string inputs. Bind to the '{nameof(CurrentValue)}' property, not '{nameof(CurrentValueAsString)}'.");
}